<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/base.xhtml">
    <ui:param name="titulo" value="E-Learning"/>
    <ui:define name="menu">
        <f:view>
            <h:form id="menu_form">
                <p:menubar>
                    <p:menuitem value="Inicio" action="#{beanQuestions.irBienvenida}" ajax="false" icon="ui-icon-home" />  
                    <p:submenu label="Opciones" icon="ui-icon-document">
                        <p:menuitem value="Evaluar" action="#{beanQuestions.evaluarNav}" ajax="false" icon="ui-icon-pencil" />  
                        <p:separator />  
                        <p:menuitem value="Estadisticas" action="#{beanQuestions.estadisticasNav}" ajax="false" icon="ui-icon-gear" />  
                    </p:submenu>
                    <p:menuitem value="Salir" action="#{beanQuestions.salir}" ajax="false" icon="ui-icon-newwin" />  
                </p:menubar>
            </h:form>
        </f:view>
    </ui:define>
    <ui:define name="content">
        <f:view>
            <h:form id="estadisticas_form">
                <p:growl id="messages"/>
                <div style="float: left;">
                    <p:panel style="margin: 12px 0 0 0">
                        <h3>Menu Graficos</h3>
                        <p:menu type="sliding" style="width:200px; height: 130px;">
                            <p:menuitem value="Promedio" actionListener="#{beanQuestions.accionMenuGraficoPromedio}" ajax="false" update="messages,show_grafic" icon="ui-icon-refresh" />
                            <p:submenu label="Promedio Area">
                                <p:menuitem value="Promedio Area" actionListener="#{beanQuestions.accionMenuGraficoPromedioArea}" ajax="false" update="messages,show_grafic" icon="ui-icon-refresh"/>
                                <p:menuitem value="Promedio Area Total" actionListener="#{beanQuestions.accionMenuGraficoPromedioAreaTotal}" ajax="false" update="messages,show_grafic" icon="ui-icon-refresh"/>
                            </p:submenu>
                            <p:menuitem value="Salir" action="#{beanQuestions.salir}" ajax="false" icon="ui-icon-newwin" />  
                        </p:menu>
                    </p:panel>
                </div>
                <div align="right">
                    <p:panel id="show_grafic" style="width: 600px; margin: 10px 0 0 0">
                        <ui:include src="#{beanQuestions.grafico.dirGrafico}" rendered="#{beanQuestions.grafico == null ? false : true}"/>
                    </p:panel>
                </div>
            </h:form>
        </f:view>
    </ui:define>
</ui:composition>

